﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CPDashboard.aspx.cs" Inherits="AiRiZu.ControlPanel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="style/style.css" />

    <script type="text/javascript" src="user/js/jquery.min.js"></script>

    <script type="text/javascript" src="user/js/jquery-ui.min.js"></script>

    <script type="text/javascript" src="user/js/jquery.imgareaselect.min.js"></script>

    <script type="text/javascript">
        function release(id) {
            $.ajax({
                type: 'POST',
                url: 'ReleaseRoom.ashx',
                data: 'roomId=' + id,
                success: function(msg) {
                    alert(msg);
                    window.location.reload(true);
                }
            });
        }

        function edit(id) {
            window.location.href("EditRoom.aspx?roomId=" + id);
            //            $.ajax({
            //                type: 'POST',
            //                url: 'GotoEditRoom.ashx',
            //                data: 'roomId=' + id,
            //                success: function(msg) {
            //                    alert(msg);
            //                    window.location.reload(true);test
            //                }
            //            });
        }
    </script>

    <script language="javascript" type="text/javascript">
        function deleted() {
            if (event.srcElement.innerText == "删除")
                event.returnValue = confirm("确实要删除此记录?");
        }
        document.onclick = deleted; 
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%--<%=RoomListString%>--%>
        <table width="1000" cellspacing="0" cellpadding="0" border="0" align="center" class="boxcolor box spacetop30">
            <tbody>
                <tr>
                    <td height="30" colspan="9">
                        <div class="divbutton03">
                            <a href="EditRoom.aspx" target="_blank" style="color: Black">添加新房间</a></div>
                        <%--<div class="divbutton03">
                            <a href="add.aspx" target="_blank" style="color: Black">查询房间</a></div>--%>
                        <div class="divbutton03">
                            <a href="PersonList.aspx" target="_blank" style="color: Black">会员查询</a></div>
                    </td>
                </tr>
                <tr>
                    <td>
                        用户姓名：<asp:TextBox ID="username" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                        邮箱：<asp:TextBox ID="useremail" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                        是否特色：<asp:DropDownList ID="Issend" runat="server" CssClass="w_128">
                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                        是否特价：<asp:DropDownList ID="IsTeSe" runat="server" CssClass="w_128">
                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                        是否发布：<asp:DropDownList ID="IsTeJia" runat="server" CssClass="w_128">
                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="sel" runat="server" Text="查询" onclick="sel_Click"></asp:Button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:DataGrid ID="SignDg" runat="server" AutoGenerateColumns="False" Width="1300px"
                            OnDeleteCommand="SignDg_DeleteCommand" OnEditCommand="SignDg_EditCommand" AllowPaging="True"
                            PageSize="20" OnPageIndexChanged="SignDg_PageIndexChanged">
                            <PagerStyle Mode="NumericPages" Position="TopAndBottom" />
                            <Columns>
                                <%--<asp:TemplateColumn HeaderText="房屋类型">
                                    <HeaderStyle Width="89" CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="pddingl5" />
                                    <EditItemTemplate>
                                        <asp:TextBox ID="time" CssClass="guestbook07" runat="server" Text='<%# Convert.ToDateTime(DataBinder.Eval(Container, "DataItem.spikestarttime")).ToString("yyyy-MM-dd hh:mm:ss")%>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <%#DataBinder.Eval(Container.DataItem, "spikestarttime")%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>--%>
                                <%--<asp:TemplateColumn HeaderText="报名查看">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                    <EditItemTemplate>
                                        <asp:TextBox ID="view" CssClass="guestbook07" runat="server" Text='<%# Eval("personcount")%>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <a href='ViewPerson.aspx?id=<%# Eval("id")%>'>
                                            <%# Eval("personcount")%></a>
                                    </ItemTemplate>
                                </asp:TemplateColumn>--%>
                                <%--<asp:TemplateColumn HeaderText="秒杀结果">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                    <ItemTemplate>
                                        <%# Eval("spikeresult").ToString() == "查看结果" ? "<a href='ViewResult.aspx?id=" + Eval("id") + "'>" + Eval("spikeresult") + "</a>" : "未秒杀"%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>--%>
                                <%--<asp:TemplateColumn HeaderText="生成代码">
                                    <HeaderStyle Width="100" CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                    <ItemTemplate>
                                        <div class="divbutton04">
                                            <a href='codes.aspx?id=<%# Eval("id") %>' target="_blank" style="color: Black">生成代码</a></div>
                                    </ItemTemplate>
                                </asp:TemplateColumn>--%>
                                <asp:BoundColumn Visible="False" DataField="SendRoomid" ReadOnly="True"></asp:BoundColumn>
                                <asp:BoundColumn DataField="Name" HeaderText="用户名称">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Email" HeaderText="邮箱">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Province" HeaderText="省">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="City" HeaderText="市">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Area" HeaderText="地区">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Adressdesc" HeaderText="详细地址">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" Width="200" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="RoomType" HeaderText="房屋类型">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Phone" HeaderText="联系电话">
                                    <HeaderStyle CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                </asp:BoundColumn>
                                <asp:TemplateColumn HeaderText="是否特色">
                                    <HeaderStyle Width="60" CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="pddingl5" />
                                    <ItemTemplate>
                                        <%--<%# Convert.ToDateTime(Eval("IsTeSe")).ToString("yyyy-MM-dd hh:mm:ss")%>--%>
                                        <%# Gettesestasts(Eval("IsTeSe").ToString())%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="是否特价">
                                    <HeaderStyle Width="60" CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="pddingl5" />
                                    <ItemTemplate>
                                        <%--<%# Convert.ToDateTime(Eval("IsTeJia")).ToString("yyyy-MM-dd hh:mm:ss")%>--%>
                                        <%# Gettejiastasts(Eval("IsTeJia").ToString())%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="是否发布">
                                    <HeaderStyle Width="60" CssClass="form_name"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" />
                                    <ItemTemplate>
                                        <%# Getsendstasts(Eval("Issend").ToString())%>
                                        <%--<%# Eval("stasts").ToString() == "进行中" ? "<em class='att_s1'>" + Eval("stasts") + "</em>" : "已结束"%>--%>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="操作">
                                    <HeaderStyle CssClass="form_name" Width="140"></HeaderStyle>
                                    <ItemStyle CssClass="textcen" VerticalAlign="Middle"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="false" CommandName="Edit"
                                            Font-Underline="false" ForeColor="Black" Text="编辑" CssClass="divbutton01"></asp:LinkButton>
                                        <asp:LinkButton ID="LinkButton5" runat="server" Text="删除" Font-Underline="false"
                                            ForeColor="Black" CommandName="Delete" CssClass="divbutton01"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                        </asp:DataGrid>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    </form>
</body>
</html>
